package com.qingcheng.dao;

import com.qingcheng.pojo.order.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.time.LocalDate;
import java.util.List;

public interface OrderMapper extends Mapper<Order> {

    @Select("SELECT COUNT(*) FROM tb_order WHERE is_delete='0' and create_time BETWEEN #{date} AND #{date1} GROUP BY usermname")
    Integer selectOrderxdrs(@Param("date") String date, @Param("date1") String date1);

    //    Integer selectOrderxdrs(@Param("date") LocalDate date, @Param("date1")LocalDate date1);
    @Select("SELECT * FROM tb_order WHERE is_delete=0 and pay_status=1 and create_time BETWEEN #{date} AND #{date1} GROUP BY usermname")
    List<Order> selectOrderfkrs(@Param("date") String date, @Param("date1") String date1);


}
